<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content=
    "application/xhtml+xml; charset=iso-8859-1" />
    <title>
      2.3.&nbsp;Building LFS in Stages
    </title>
    <link rel="stylesheet" type="text/css" href="../stylesheets/lfs.css" />
    <meta name="generator" content="DocBook XSL Stylesheets V1.78.1" />
    <link rel="stylesheet" href="../stylesheets/lfs-print.css" type=
    "text/css" media="print" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  </head>
  <body class="lfs" id="lfs-8.0-systemd">
    <div class="navheader">
      <h4>
        Linux From Scratch - Version 8.0-systemd
      </h4>
      <h3>
        Chapter&nbsp;2.&nbsp;Preparing the Host System
      </h3>
      <ul>
        <li class="prev">
          <a accesskey="p" href="hostreqs.html" title=
          "Host System Requirements">Prev</a>
          <p>
            Host System Requirements
          </p>
        </li>
        <li class="next">
          <a accesskey="n" href="creatingpartition.html" title=
          "Creating a New Partition">Next</a>
          <p>
            Creating a New Partition
          </p>
        </li>
        <li class="up">
          <a accesskey="u" href="chapter02.html" title=
          "Chapter&nbsp;2.&nbsp;Preparing the Host System">Up</a>
        </li>
        <li class="home">
          <a accesskey="h" href="../index.html" title=
          "Linux From Scratch - Version 8.0-systemd">Home</a>
        </li>
      </ul>
    </div>
    <div class="sect1" lang="en" xml:lang="en">
      <h1 class="sect1">
        <a id="stages" name="stages"></a>2.3. Building LFS in Stages
      </h1>
      <p>
        LFS is designed to be built in one session. That is, the instructions
        assume that the system will not be shut down during the process. That
        does not mean that the system has to be done in one sitting. The
        issue is that certain procedures have to be re-accomplished after a
        reboot if resuming LFS at different points.
      </p>
      <div class="sect2" lang="en" xml:lang="en">
        <h2 class="sect2">
          2.3.1. Chapters 1-4
        </h2>
        <p>
          These chapters are accomplished on the host system. When
          restarting, be careful of the following:
        </p>
        <div class="itemizedlist">
          <ul>
            <li class="listitem">
              <p>
                Procedures done as the root user after Section 2.4 need to
                have the LFS environment variable set <span class=
                "emphasis"><em>FOR THE ROOT USER</em></span>.
              </p>
            </li>
          </ul>
        </div>
      </div>
      <div class="sect2" lang="en" xml:lang="en">
        <h2 class="sect2">
          2.3.2. Chapter 5
        </h2>
        <div class="itemizedlist">
          <ul>
            <li class="listitem">
              <p>
                The /mnt/lfs partition must be mounted.
              </p>
            </li>
            <li class="listitem">
              <p>
                <span class="emphasis"><em>ALL</em></span> instructions in
                Chapter 5 must be done by user <span class=
                "emphasis"><em>lfs</em></span>. A <span class=
                "command"><strong>su - lfs</strong></span> needs to be done
                before any task in Chapter 5.
              </p>
            </li>
            <li class="listitem">
              <p>
                The procedures in <a class="xref" href=
                "../chapter05/generalinstructions.html" title=
                "5.3.&nbsp;General Compilation Instructions">Section&nbsp;5.3,
                &ldquo;General Compilation Instructions&rdquo;</a> are
                critical. If there is any doubt about installing a package,
                ensure any previously expanded tarballs are removed,
                re-extract the package files, and complete all instructions
                in that section.
              </p>
            </li>
          </ul>
        </div>
      </div>
      <div class="sect2" lang="en" xml:lang="en">
        <h2 class="sect2">
          2.3.3. Chapters 6-8
        </h2>
        <div class="itemizedlist">
          <ul>
            <li class="listitem">
              <p>
                The /mnt/lfs partition must be mounted.
              </p>
            </li>
            <li class="listitem">
              <p>
                When entering chroot, the LFS environment variable must be
                set for root. The LFS variable is not used otherwise.
              </p>
            </li>
            <li class="listitem">
              <p>
                The virtual file systems must be mounted. This can be done
                before or after entering chroot by changing to a host virtual
                terminal and, as root, running the commands in <a class=
                "xref" href="../chapter06/kernfs.html#ch-system-bindmount"
                title=
                "6.2.2.&nbsp;Mounting and Populating /dev">Section&nbsp;6.2.2,
                &ldquo;Mounting and Populating /dev&rdquo;</a> and <a class=
                "xref" href="../chapter06/kernfs.html#ch-system-kernfsmount"
                title=
                "6.2.3.&nbsp;Mounting Virtual Kernel File Systems">Section&nbsp;6.2.3,
                &ldquo;Mounting Virtual Kernel File Systems&rdquo;</a>.
              </p>
            </li>
          </ul>
        </div>
      </div>
    </div>
    <div class="navfooter">
      <ul>
        <li class="prev">
          <a accesskey="p" href="hostreqs.html" title=
          "Host System Requirements">Prev</a>
          <p>
            Host System Requirements
          </p>
        </li>
        <li class="next">
          <a accesskey="n" href="creatingpartition.html" title=
          "Creating a New Partition">Next</a>
          <p>
            Creating a New Partition
          </p>
        </li>
        <li class="up">
          <a accesskey="u" href="chapter02.html" title=
          "Chapter&nbsp;2.&nbsp;Preparing the Host System">Up</a>
        </li>
        <li class="home">
          <a accesskey="h" href="../index.html" title=
          "Linux From Scratch - Version 8.0-systemd">Home</a>
        </li>
      </ul>
    </div>
  </body>
</html>
